]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Take the viewBox into account for the contentBox of folders
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 17 Feb 2020 13:12:47 +0000 (14:12 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Sun, 8 Mar 2020 00:42:40 +0000 (00:42 +0000)
The viewBox has a border applied, so when we call adaptToSize using only
the content box of the container, the width of the border is not removed
from the content box and the grid will be allocated less space than what
we told it before using adaptToSize.

Fix that by adjusting the content box for the size of the viewBox, too.
This makes sure the correct amount of columns can be shown inside a
folder, since right now we only show 3 colums even though 4 would fit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1011

js/ui/appDisplay.js

index a602ba65db8361a58f29179ce22c33ec482c3c1f..f5e18d2ad22fe087a6a9703fda9a4078179a1ff8 100644 (file)
@@ -1902,6 +1902,7 @@ var AppFolderDialog = GObject.registerClass({
 
     vfunc_allocate(box, flags) {
         let contentBox = this.get_theme_node().get_content_box(box);
+        contentBox = this._viewBox.get_theme_node().get_content_box(contentBox);
 
         let [, entryBoxHeight] = this._entryBox.get_size();
         let spacing = this._viewBox.layout_manager.spacing;